﻿<UserControl x:Class="Peter.Sdw.View.EntryEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:view="clr-namespace:Peter.Sdw.View"
             xmlns:controls="clr-namespace:Peter.Common.Controls;assembly=Peter.Common"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="800">
   <Grid>
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="Auto"
                           MinWidth="200" />
         <ColumnDefinition Width="5" />
         <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>

      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition Height="*" />
      </Grid.RowDefinitions>

      <TextBlock Text="Text"
                 FontWeight="Bold" />
      <TextBox Text="{Binding Path=Text}"
               x:Name="TextBox"
               SelectionChanged="OnTextSelectionChanged"
               VerticalScrollBarVisibility="Auto"
               TextWrapping="WrapWithOverflow"
               VerticalAlignment="Stretch"
               AcceptsReturn="True"
               Grid.Column="0"
               Grid.Row="1" />

      <GridSplitter Grid.Column="1"
                    Grid.RowSpan="2"
                    Grid.Row="0"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch" />

      <Grid Grid.Row="0"
            Grid.Column="2">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="75" />
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="20" />
            <ColumnDefinition Width="75" />
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
         </Grid.ColumnDefinitions>
         <TextBlock Text="Start Index"
                    Grid.Column="1"
                    VerticalAlignment="Center" />
         <controls:NumericUpDown Grid.Column="2"
                                 Precision="0"
                                 Value="{Binding Path=StartIndex}" />
         <TextBlock Text="End Index"
                    Grid.Column="4"
                    VerticalAlignment="Center" />
         <controls:NumericUpDown Grid.Column="5"
                                 Precision="0"
                                 Value="{Binding Path=EndIndex}" />
      </Grid>
      
      <TabControl Grid.Column="2"
                  Grid.Row="1">
         <TabItem Header="Links"
                  IsSelected="True">
            <view:LinkEditView DataContext="{Binding Path=LinkInput}" />
         </TabItem>
         <TabItem Header="Styles">
            <view:StyleEditView DataContext="{Binding Path=StyleInput}" />
         </TabItem>
         <TabItem Header="Footers">
            <!--<view:StyleEditView DataContext="{Binding Path=StyleInput}" />-->
         </TabItem>
      </TabControl>
   </Grid>
</UserControl>
